import { api } from '@/utils/request'

// 获取商品的详细数据
export const findGoods = (id) => {
  return api({
    method: 'get',
    url: '/goods',
    data: { id }
  })
}
/**
 * 获取商品同类推荐-未传入ID为猜喜欢
 * @param {String} id - 商品ID
 * @param {Number} limit - 获取条数
 */
export const findRelGoods = (id, limit = 16) => {
  return api({
    method: 'get',
    url: '/goods/relevant',
    data: { id, limit }
  })
}
